package com.xiyoufang.club.repository;

import com.xiyoufang.club.entity.ClubCsHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public abstract interface ClubCsHistoryRepository
  extends JpaRepository<ClubCsHistory, Integer>, JpaSpecificationExecutor<ClubCsHistory>
{
  @Query(nativeQuery=true, value="SELECT * FROM club_cs_history t WHERE t.club_id=:clubId and t.par_user_id=:parUserId LIMIT 1")
  public abstract ClubCsHistory getClubUserIntegralByUserIdAndClubId(@Param("clubId") Integer paramInteger1, @Param("parUserId") Integer paramInteger2);
}
